|
|
High!
While playing around with procedurally generated countries' flags, I
tried to use them in patterns... and to make it simple in the beginning,
I started with a checker pattern containing the flags of Palau and
Trinidad and Tobago:
The include file containing the texture definitions (I plan to program
all sovereign countries' flags of the world later on):
// beginning of procflags.inc
#declare F_NoLights =
finish
{
ambient 1
diffuse 0
}
#declare P_Flag_Palau =
pigment
{
spherical
color_map
{
[0 rgb <0, 0.75, 1>]
[0.0001 rgb <0, 0.75, 1>]
[0.0001 rgb <1, 1, 0>]
}
// translate <-0.1, 0, 0.03>
}
#declare T_Flag_Palau =
texture
{
pigment { P_Flag_Palau }
finish { F_NoLights }
}
#declare P_Flag_TrinidadAndTobago =
pigment
{
gradient x
triangle_wave
color_map
{
[0.87 rgb <1, 0, 0>]
[0.87 rgb 1]
[0.92 rgb 1]
[0.92 rgb 0]
}
rotate y*45
}
#declare T_Flag_TrinidadAndTobago =
texture
{
pigment { P_Flag_TrinidadAndTobago }
finish { F_NoLights }
}
// end of procflags.inc
And the actual test scene:
// beginning of procflagstest.pov
#include "procflags.inc"
plane
{
y, 0
texture
{
pigment
{
checker
pigment { P_Flag_Palau }
pigment { P_Flag_TrinidadAndTobago }
}
finish { ambient 1 diffuse 0 }
}
}
camera
{
location <0, 10, 0>
look_at 0
angle 40
}
// end of procflagstest.pov
...but the textures continue through the checker pattern rather than
being "copied" into each checker cell (see attached picture) - is this a
general shortcoming of the checker pattern, or are there ways to avoid this?
See you on www.khyberspace.de!
Yadgar
Post a reply to this message
Attachments:
Download 'procflagstest.png' (4 KB)
Preview of image 'procflagstest.png'
|
|